package top.suven.base.util.utilize;

public class TestJava {
    public static void main(String[] args) {  
        // 使用用Ping命令   
  
        //Process ee = Runtime.getRuntime().exec(   
        //"cmd.exe /c start ping 10.5.2.19");  
        /* 
        try{ 
            Runtime rt = Runtime.getRuntime(); 
            //System.out.println("start!"); 
            Process proc = Runtime.getRuntime().exec("cmdpython c:\\Python32\\program\\outfile.py"); 
            proc.waitFor(); //waiting the completion of the command 
             
            //System.out.println("end"); 
        }catch (Exception e){ 
            e.printStackTrace(); 
        } 
        */  
        //ok 这个是可以使用的   
        try{  
            Runtime rt = Runtime.getRuntime();  
            System.out.println("start");  
            Process proc = Runtime.getRuntime().exec("python outfile.py");  
            proc.waitFor();  
            System.out.println("end");  
            } catch (Exception e){  
            e.printStackTrace();  
            }  
  
  
          
  
        }//main  
      
  
  
}  